<?php

namespace App\Repositories\Eloquent\Api;

use App\Repositories\Eloquent\BaseModel;
use EasySwoole\ORM\AbstractModel;


class AppidModel extends AbstractModel
{
    use BaseModel;
    protected $tableName = 'k_example_appid';
    protected $connectionName = 'wr';
    protected $autoTimeStamp = true;
    protected $createTime = 'add_time';
    protected $updateTime = 'update_time';

    public function getAppsecretByAppid(string $appid = ''){
        return $this->create()->where('appid',$appid)->scalar('appsecret');
    }
}